<?php

$strScreenName = 'EnterProductColour';
$strQueryName = 'qryAddProductColour';
$strFormName = 'frmEnterProductColour';

     if ((($_POST[intProductColourID]) || ($_GET[intProductColourID])) && (!$_POST[$strReprocessing])) {
             include (MODULE . "/action/qrySelectProductColour");
             if($_POST[intProductColourID]){
             	$_POST[intProductColourID]= $_GET[intProductColourID];
             }
             $strButtonTitle = "update";
             $txtID = stripslashes($myrow["ID"]);
             $cboProduct = stripslashes($myrow["Product"]);
             $cboColour = stripslashes($myrow["Colour"]);
         }else{
             $strTitle = "Enter";
             $strButtonTitle = "save";
             if($txtID){ $txtID = stripslashes(eregi_replace("\"", "&quot;", $_POST[txtID])); }
     }

echo "
<tr>
     <td>
         <table  width='450' cellpadding='0' cellspacing='0' border='0' class='Normal' align='center'>
     <tr align='left'>
         <td align='left' colspan='2'>
             <H2>$strTitle Product Colour</H2>
         </td>
     </tr>
";
// Upploaded = 0
echo (StartForm($strScreenName, "post", $strQueryName,array('intProductColourID'=>$_POST[intProductColourID],'strReprocessing'=>'True'),"","",$strFormName,"","return frmEnterProductColour_onsubmit()"));


echo "
     <tr align='left'>
         <td align='right'>
             <b>Product :</b>
         </td>
         <td align='left'>";
             CreateDropDown("cboProduct", "SELECT * FROM tblProduct ORDER BY 2", "", $cboProduct);
echo "
             <a href='".ScreenURL("EnterProduct")."' target='_blank'>+</a>
         </td>
     </tr>

     <tr align='left'>
         <td align='right'>
             <b>Colour :</b>
         </td>
         <td align='left'>";
             CreateDropDown("cboColour", "SELECT * FROM tblColour ORDER BY 2", "", $cboColour);
echo "
             <a href='".ScreenURL("EnterColour")."' target='_blank'>+</a>
         </td>
     </tr>

     <tr>
         <td align='right' colspan='2'>
             <input type='image' src='./images/$strButtonTitle.gif' alt='$strButtonTitle'>
         </td>
     </tr>
         </table
     </form>
     </td>
 </tr>
";

     //$strListAll = "true";
       //include (MODULE . "/screen/ListProductColour");
?>
<script language="JavaScript">
<!--
function frmEnterProductColour_onsubmit() 
{


var ProductSelected = document.frmEnterProductColour.cboProduct.options[document.frmEnterProductColour.cboProduct.selectedIndex].value;
     if(ProductSelected) {
     }else{
         alert("Please enter Product");
         return(false);
     }

var ColourSelected = document.frmEnterProductColour.cboColour.options[document.frmEnterProductColour.cboColour.selectedIndex].value;
     if(ColourSelected) {
     }else{
         alert("Please enter Colour");
         return(false);
     }


}
// -->
</script>
